// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-04-24 10:28:09
// 生成路径: api/v1/business/agents.go
// 生成人：周志雄
// desc:代理商相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package business

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

// AgentsSearchReq 分页请求参数
type AgentsSearchReq struct {
	g.Meta   `path:"/list" tags:"代理商" method:"get" summary:"代理商列表"`
	Name     string `p:"name" dc:"代理商名称"`        //代理商的名称
	State    string `p:"state" dc:"状态 1正常 -1禁用"` //状态 1正常 -1禁用
	PageNum  int    `p:"pageNum" dc:"当前页码"`      //当前页码
	PageSize int    `p:"pageSize" dc:"每页数"`      //每页数
	commonApi.Author
}

// AgentsSearchRes 列表返回结果
type AgentsSearchRes struct {
	g.Meta `mime:"application/json"`
	commonApi.ListRes
	List []*model.AgentsListRes `json:"list"`
}

// AgentsAddReq 添加操作请求参数
type AgentsAddReq struct {
	g.Meta `path:"/add" tags:"代理商" method:"post" summary:"代理商添加"`
	commonApi.Author
	Name string `p:"name" v:"required#代理商的名称不能为空" dc:"代理商名称"`
}

// AgentsAddRes 添加操作返回结果
type AgentsAddRes struct {
	commonApi.EmptyRes
}

// AgentsEditReq 修改操作请求参数
type AgentsEditReq struct {
	g.Meta `path:"/edit" tags:"代理商" method:"put" summary:"代理商修改"`
	commonApi.Author
	Id    int    `p:"id" v:"required#主键ID不能为空" dc:"ID"`
	Name  string `p:"name" v:"required#代理商的名称不能为空" dc:"代理商名称"`
	State string `p:"state" dc:"状态 1正常 -1禁用"`
}

// AgentsEditRes 修改操作返回结果
type AgentsEditRes struct {
	commonApi.EmptyRes
}

// AgentsGetReq 获取一条数据请求
type AgentsGetReq struct {
	g.Meta `path:"/get" tags:"代理商" method:"get" summary:"获取代理商信息"`
	commonApi.Author
	Id int `p:"id" v:"required#主键必须" dc:"主键"` //通过主键获取
}

// AgentsGetRes 获取一条数据结果
type AgentsGetRes struct {
	g.Meta `mime:"application/json"`
	*model.AgentsInfoRes
}

// AgentsDeleteReq 删除数据请求
type AgentsDeleteReq struct {
	g.Meta `path:"/delete" tags:"代理商" method:"delete" summary:"删除代理商"`
	commonApi.Author
	Ids []int `p:"ids" v:"required#主键必须" dc:"主键ID列表"` //通过主键删除
}

// AgentsDeleteRes 删除数据返回
type AgentsDeleteRes struct {
	commonApi.EmptyRes
}
